/*
@file	Vector.h
@author	Saume
*/

#ifndef VECTOR_H
#define VECTOR_H

#include <math.h>
#include <iostream>

#define PI 3.14159f
// for floating point numbers rounding, for comparisons
#define EPSILON 0.0001f
// for double precision floating point numbers rounding, for comparisons
#define EPSILON_DBL 0.0001
#define HALF_CIRCLE 180.0f
#define FULL_CIRCLE 360.0f
#define UNIT_LENGTH 1.0f

class Vector;
bool FloatEquals(float, float);
bool operator==(const Vector&, const Vector&);
Vector* operator*(const Vector&, float);
Vector* operator*(const Vector&, int);
Vector* operator*(float, const Vector&);
Vector* operator*(int, const Vector&);
float operator*(const Vector&, const Vector&);
Vector* operator+(const Vector&, const Vector&);
Vector* operator-(const Vector&, const Vector&);


class Vector {
public:
	float x, y, z;

	Vector();
	Vector(float, float, float);
	void Add(const Vector* const);
	void Substract(const Vector* const);
	void Scale(float);
	float Dot(const Vector* const) const;
	Vector* CrossLH(const Vector* const) const;
	Vector* CrossRH(const Vector* const) const;
	void MoveBy(const Vector* const);
	float GetPolarAngleDeg() const;
	float AngleBetweenDeg(const Vector* const) const;
	float Length() const;
	float LengthSq() const;
	bool Normalize();
	void Display() const;

	static Vector* GetVectorByAngleDeg(float);
};

#endif